package com.gee.spring.cloud.aerospace.simulate.mgt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gee.cloud.common.core.domain.entity.BaseEntity;
import com.gee.excel.core.annotation.ExcelColumn;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 卫星遥测参数
 * </p>
 *
 * @author gee
 * @since 2024-07-10
 */
@Getter
@Setter
@TableName("gee_cloud_satellite_telemetry_param")
@Schema(description = "卫星遥测参数")
public class SatelliteTelemetryParam extends BaseEntity<SatelliteTelemetryParam> {

    private static final long serialVersionUID = 1L;

    @Schema(description = "id", required = true)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "卫星id", required = true)
    @TableField(value = "sate_id")
    @NotNull(message = "卫星id不能为空")
    @ExcelColumn(header = "卫星id")
    private Long sateId;

    @Schema(description = "遥测包id", required = true)
    @TableField(value = "package_id")
    @NotNull(message = "遥测包id不能为空")
    @ExcelColumn(header = "遥测包id")
    private Long packageId;

    @Schema(description = "包代号", required = true)
    @TableField(value = "param_code")
    @NotNull(message = "包代号不能为空")
    @ExcelColumn(header = "包代号")
    private String paramCode;

    @Schema(description = "包名称", required = true)
    @TableField(value = "param_name")
    @NotNull(message = "包名称不能为空")
    @ExcelColumn(header = "包名称")
    private String paramName;

    @Schema(description = "波道", required = true)
    @TableField(value = "channel")
    @NotNull(message = "波道不能为空")
    @ExcelColumn(header = "波道")
    private String channel;

    @Schema(description = "长度(位)", required = true)
    @TableField(value = "param_length")
    @NotNull(message = "长度(位)不能为空")
    @ExcelColumn(header = "长度(位)")
    private Integer paramLength;

    @Schema(description = "波道字节开始", required = true)
    @TableField(value = "byte_begin")
    @NotNull(message = "波道字节开始不能为空")
    @ExcelColumn(header = "波道字节开始")
    private Integer byteBegin;

    @Schema(description = "波道字节结束", required = true)
    @TableField(value = "byte_end")
    @NotNull(message = "波道字节结束不能为空")
    @ExcelColumn(header = "波道字节结束")
    private Integer byteEnd;

    @Schema(description = "波道位开始", required = true)
    @TableField(value = "bit_begin")
    @NotNull(message = "波道位开始不能为空")
    @ExcelColumn(header = "波道位开始")
    private Integer bitBegin;

    @Schema(description = "波道位结束", required = true)
    @TableField(value = "bit_end")
    @NotNull(message = "波道位结束不能为空")
    @ExcelColumn(header = "波道位结束")
    private Integer bitEnd;

    @Schema(description = "初始值", required = true)
    @TableField(value = "init_value")
    @NotNull(message = "初始值不能为空")
    @ExcelColumn(header = "初始值")
    private String initValue;

    @Schema(description = "遥测公式id", required = true)
    @TableField(value = "dsl_id")
    @NotNull(message = "遥测公式id不能为空")
    @ExcelColumn(header = "遥测公式id")
    private Long dslId;

    @Schema(description = "遥测公式参数", required = true)
    @TableField(value = "dsl_param")
    @NotNull(message = "遥测公式参数不能为空")
    @ExcelColumn(header = "遥测公式参数")
    private String dslParam;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
